﻿@using Jp.UI.SSO.Models
@model Jp.UI.SSO.Models.LoggedOutViewModel
@using Microsoft.AspNetCore.Mvc.Localization
@inject IViewLocalizer Localizer
@{
    // set this so the layout rendering sees an anonymous user
    ViewData["signed-out"] = true;
    Layout = "~/Views/Shared/_LayoutExt.cshtml";
}
<div class="container">
    <div class="row justify-content-center">
        <div class="col-md-8">
            <div class="card-group">
                <div class="card p-4">
                    <div class="card-body">
                        <h1>
                            @*Cya!*@
                            <small>@Localizer["Title-You-are-now-logged-out"]</small>
                        </h1>
                        @if (!string.IsNullOrEmpty(Model.PostLogoutRedirectUri))
                        {
                            <div>
                                @Localizer["Body-Click"] <a class="PostLogoutRedirectUri" href="@Model.PostLogoutRedirectUri">@Localizer["Body-here"]</a> @Localizer["Body-to-return"]
                                <span>@Model.ClientName</span> @Localizer["Body-application"].
                            </div>
                        }
                        else
                        {
                            <div>
                                @Localizer["Body-Click"] <a asp-controller="Account" asp-action="Login">@Localizer["Body-here"]</a> @Localizer["Body-to-login"]

                            </div>
                        }
                    </div>
                </div>
            </div>
            @if (Model.SignOutIframeUrl != null)
            {
                <iframe width="0" height="0" class="signout" src="@Model.SignOutIframeUrl"></iframe>
            }
        </div>
    </div>
</div>
@section scripts
    {
    @if (Model.AutomaticRedirectAfterSignOut)
    {
        <script src="@Url.Content("~/js/signout-redirect.js")"></script>
    }
}
